<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>{{$lesson->name}}—回放中</title>
    <!-- Styles -->
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">
</head>
<body>
<div id="app">
    <nav class="navbar navbar-expand-md navbar-light navbar-laravel">
        <div class="container-fluid row ">
            <a class="navbar-brand col-2" href="{{ url('/') }}">
                {{ config('app.name', 'Laravel') }}
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                    aria-controls="navbarSupportedContent" aria-expanded="false"
                    aria-label="{{ __('Toggle navigation') }}">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse col" id="navbarSupportedContent">
                <!-- Right Side Of Navbar -->
                <ul class="navbar-nav ml-auto">
                    <!-- Authentication Links -->
                    @guest
                        <li class="nav-item">
                            <a class="nav-link" href="{{ route('login') }}">{{ __('登陆') }}</a>
                        </li>
                        <li class="nav-item">
                            <p class="na_center hidden-xs">|</p>
                        </li>
                        <li class="nav-item border-light">
                            <a class="nav-link" href="{{ route('register') }}">{{ __('注册') }}</a>
                        </li>
                    @else
                        <li class="nav-item dropdown">
                            <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button"
                               data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
                                你好，{{ \Auth::user()->student?\Auth::user()->student->name:'' }} <span
                                        class="caret"></span>
                            </a>

                            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
                                <a class="dropdown-item" href="{{ route('user-center') }}">
                                    {{ __('个人中心') }}
                                </a>

                                <a class="dropdown-item" href="{{ route('logout') }}"
                                   onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">
                                    {{ __('登出') }}
                                </a>

                                <form id="logout-form" action="{{ route('logout') }}" method="POST"
                                      style="display: none;">
                                    @csrf
                                </form>
                            </div>
                        </li>
                    @endguest
                </ul>
            </div>
        </div>
    </nav>
    <div class="container-fluid p-0">
        <div class="container">
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="/">首页</a></li>
                    <li class="breadcrumb-item active" aria-current="page">{{$lesson->name}}</li>
                </ol>
            </nav>
            <h4 class="ml-3 mb-3">{{$lesson->name}}</h4>
        </div>
        <div class="container-fluid ">
            <div class="row video-box">
                <div class="container">
                    <div class="row my-5">
                        <div class="col-9 video-live-box" id="videoId">
                        </div>
                        <div class="col justify-content-center">
                            <div class="video-speaker-desc p-3">
                                <img class="head " src="{{$lesson->course->speaker->teacher->photo}}" alt="">
                                <div class="name">{{$lesson->course->speaker_name}}</div>
                                <div class="profile">{{$lesson->course->speaker->teacher->profile}}</div>
                            </div>
                            <div class="classmate mt-3 p-3">
                                <div class="classmate-title">
                                    {{$classmate_count}} 人在学习该课程
                                </div>
                                <div class="row">
                                    @foreach($classmate as $item)
                                        <div class="col-3 p-2 text-center">
                                            <img src="{{asset('/img/student.png')}}" class="img-fluid" alt="">
                                            <p>{{$item->name}}</p>
                                        </div>
                                    @endforeach
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script src="{{ asset('/js/manifest.js')}}"></script>
<script src="{{ asset('/js/vendor.js')}}"></script>
<script src="http://cnstatic01.e.vhall.com/3rdlibs/jquery/1.11.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://cnstatic01.e.vhall.com/jssdk/dist/2.4.1/vhallSDK.js"></script>
<script type="text/javascript">
  VHALL_SDK.init({
    account: '{{$auth->mobile}}',//必填，唯一用户id，与使用第三方创建用户接口所传的third_user_id需一致）
    username: '{{$auth->student->name}}',//必填，用户昵称用以在各模块中显示
    roomid: '{{$room}}',//必填，当前聊天所在活动id
    app_key: '{{env('WEIHOU_APP_KEY')}}',//必填，启用服务唯一验证，API/SDK权限申请后生成,此参数名在1.0.0版本中为appkey，使用当前版本时请更新
    signedat:{{$signTime}},//必填，启用服务唯一验证，unix时间戳
    sign: '{{$sign}}',//必填，启用服务唯一验证，有效期一小时，见下面的生成规则
    email: '',//非必填，当前版本已不建议使用
    facedom: '',//可选，当使用微吼表情时必填，呼出表情弹窗dom属性 如（'#id','.class'等）
    textdom: '',//可选，当使用微吼表情时必填，插入表情文本dom属性 如（'#id','.class'等）
    videoContent: '#videoId',//必填，当需要使用视频模块时，插入视频dom属性 如（'#id','.class'等）
    docContent: '',//可选，当需要使用文档模块时，插入视频dom属性 如（'#id','.class'等）
    x5_video_type: 'h5',  //非必填，启用腾讯Ｈ5同层播放器，V2.3.5及之后版本支持
    x5_video_fullscreen: 'true', //非必填,字符串，启用腾讯Ｈ5全屏方式，V2.3.5及之后版本支持
    protocol: '', //非必填,字符串 默认自适应当前url协议，支持手动指定http和https
  })
</script>
</html>